home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 6 / FM Towns Free Software Collection 6.iso / ms_dos / gds / source / gds102.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  768 b   |  36 lines

  1.  
  2. /*
  3.  *
  4.  *    GDS102 : パレットレジスタの設定
  5.  *
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <dos.h>
  10.  
  11. unsigned int GDS_palette(unsigned int color,unsigned char red,unsigned char green,unsigned char blue) {
  12.    union  REGS  inregs, outregs;
  13.    struct SREGS segregs;
  14.    static struct {
  15.       unsigned int length;
  16.       unsigned int color;
  17.       unsigned char dust;
  18.       unsigned char red;
  19.       unsigned char green;
  20.       unsigned char blue;
  21.    } work;
  22.  
  23.    work.length=6;
  24.    work.color=color;
  25.    work.dust=0;
  26.    work.red=red;
  27.    work.green=green;
  28.    work.blue=blue;
  29.    segread(&segregs);
  30.    segregs.ds=_DS;
  31.    inregs.x.di=(unsigned int)&work;
  32.    inregs.x.ax=0x8300;
  33.    int86x(0x92,&inregs,&outregs,&segregs);
  34.    return (unsigned int)outregs.h.ah;
  35. }
  36.